package com.amado.course13.zuoye;

public class StudentSimple {

	public static void main(String[] args) {
		CountInfo countInfo = new CountInfo();
		countInfo.studentCount++;
		countInfo.teacherCount++;
		//学生
		Student[] studentArray = new Student[100];
		initStudent(studentArray);
		//打印
		printStudent(studentArray,countInfo.studentCount);
	}
	/**
	 * 打印学生
	 * @param studentArray
	 */
	public static void printStudent(Student[] studentArray,int count){
		System.out.println("id\t姓名\t年龄");
		for(Student student:studentArray){
			if(student!=null){
				System.out.println(student.id+"\t"+student.name+"\t"+student.age);
			}
		}
	}
	/**
	 * 初始化学生对像
	 * @param studentArray
	 */
	public static void initStudent(Student[] studentArray) {
		Student student = new Student();
		student.age = 13;
		student.name = "张三";
		student.id = 1;

		Student student2 = new Student();
		student2.age = 13;
		student2.name = "张三";
		student2.id = 1;

		studentArray[0] = student;
		studentArray[1] = student2;
	}
	
}
